# {{ ansible_managed }}

router id {{ bird_router_id }};

{% for include in item.includes %}
include "{{ include }}";
{% endfor -%}

{% for name, filter in item.filters.items() %}
filter {{ name }} {
  {{ filter | indent(2) -}}
}
{% endfor -%}

{% for proto_type, protos in item.protocols.items() %}
{% if protos is string %}
protocol {{ proto_type }} {
  {{ protos | indent(2) -}}
}
{% else %}
{% for proto_name, proto_attrs in protos.items() %}
protocol {{ proto_type }} {{ proto_name }} {
  {{ proto_attrs | indent(2) -}}
}
{% endfor %}
{% endif %}
{% endfor %}
